home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
376-400
/
399
/
prettywindows
/
pwwindow.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-14
|
2KB
|
64 lines
#include <exec/types.h>
#include <intuition/intuition.h>
/********************************************
* PrettyWindows v1.0 by Thom Robertson *
********************************************/
/*
This routine opens a window.
The screen argument is a pointer to a Screen structure (this screen
must be open). If the screen pointer is NULL (0), the window will open on
the Workbench screen. The arguments are size variables.
This routine returns the pointer to this window's Window structure if it
was successful, otherwise it returns NULL (0).
When called, it is assumed that the Intuition Library has already been
called. If not, BOOM!
If the window is larger than the screen, or is positioned off the edge of
the screen, this routine may go BOOM.
Note that since this window is BORDERLESS and has no gadgets or title, it
will be completely blank until you put something in it. Don't let this
throw you.
*/
makewindow(screen,x,y,w,h)
struct Screen *screen;
int x,y,w,h;
{
struct NewWindow NewWindow;
struct Window *Window;
NewWindow.LeftEdge = x;
NewWindow.TopEdge = y;
NewWindow.Width = w;
NewWindow.Height = h;
NewWindow.DetailPen = 0;
NewWindow.BlockPen = 1;
NewWindow.Title = NULL;
NewWindow.Flags = ACTIVATE;
NewWindow.IDCMPFlags = MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP+
MENUPICK+RAWKEY+ACTIVEWINDOW+INACTIVEWINDOW+BORDERLESS;
if (screen != NULL)
NewWindow.Type = CUSTOMSCREEN;
else
NewWindow.Type = WBENCHSCREEN;
NewWindow.FirstGadget = NULL;
NewWindow.CheckMark = NULL;
NewWindow.Screen = screen;
NewWindow.BitMap = NULL;
NewWindow.MinWidth = 0;
NewWindow.MinHeight = 0;
NewWindow.MaxWidth = -1;
NewWindow.MaxHeight = -1;
if ((Window = (struct Window *)OpenWindow(&NewWindow))== NULL)
return(0);
return(Window);
}